The present invention generally pertains to exporting data into hypertext markup language (HTML) documents, and more specifically, to updating a previously exported discreet data section in an HTML document, without changing any other section of the HTML document; and while ensuring that such data can be imported from the HTML document back into a source application with all the formatting unique to the source application intact.
With the increasing popularity of the Internet, HTML documents or files has become the internationally accepted format for sharing data xe2x80x9con-line.xe2x80x9d An on-line information system typically includes a server computer system that makes information available so that client computer systems can access the information. The server and client computer systems are usually connected in either a local area or a wide area private Intranet system, or via the public Internet. A unique uniform resource locator (URL) is associated with each HTML document, enabling the client computer systems to request a specific HTML document from a server computer system.
An HTML document includes a hierarchical set of markup elements; most elements have a start tag, followed by content, followed by an end tag. The content is typically a combination of text and nested markup elements. Tags, which are enclosed in angle brackets (xe2x80x98 less than xe2x80x99 and xe2x80x98 greater than xe2x80x99), indicate how the document is structured and how to display the document, i.e., its format. There are tags for markup elements such as titles and headers, for text attributes such as bold and italic, for lists, for paragraph boundaries, for links to other documents or other parts of the same document, for graphic images, for non-displayed comments, and for many other features. Further details regarding HTML may be found in reference books such as, xe2x80x9cHTML For Dummies,xe2x80x9d by Ed Tittel and Steve James (1996).
The following lines of HTML briefly illustrate how the language is used:
Here we start a new paragraph  less than P greater than .
Some words are  less than B greater than bold less than /B greater than , others are  less than I greater than italic less than /I greater than . The viewer of the document will see:
Here we start a new paragraph.
Some words are bold, others are italic.
As noted above, a user who wishes to retrieve and display an HTML document generally uses a Web browser program. Two of the popular Web browser programs are: NAVIGATOR(trademark) from Netscape Communications Corp. of Mountain View, Calif., and INTERNET EXPLORER(trademark) from Microsoft Corporation of Redmond, Wash. The primary functionality of web browsers is directed to finding, retrieving, and displaying documents. A browser is generally not intended for word processing or data manipulation of the information contained within an HTML document, but can display documents or data generated by word processing or spreadsheet applications, once converted into an appropriate HTML compatible format.
A wide variety of data may be shared among different users in a network environment using HTML. Typical HTML documents include images, text, and data. HTML documents can be created using programs specifically designed for that purpose, such as Microsoft Corporation""s FRONTPAGE(trademark) Web Page publishing program. Additionally, some applications, such as Microsoft Corporation""s WORD 97(trademark) word processing program, allow a user to save a text document as an HTML document. Microsoft Corporation""s EXCEL 97(trademark) spreadsheet program also enables a user to export a data table or chart created on a worksheet into an existing or new HTML document. If EXCEL 97 is used to export a data table or chart into an existing HTML document, the user is required to use a separate HTML editor to insert a marker tag,  less than !--##Table##-- greater than , into the HTML document at the location where the table is to be inserted. EXCEL 97 will then convert the spreadsheet data table into the HTML compatible format and insert the data at the location in the HTML document specified by the marker tag. It would be desirable to be able to export a spreadsheet data table converted into HTML compatible format into an HTML document without requiring that an HTML editing application insert a  less than !--##Table##-- greater than  marker tag.
A characteristic of data tables or charts incorporated into HTML documents using prior art methods is that once the data tables or charts are imported into the HTML document, they lose virtually all of the functionality that they had in the spreadsheet application. Furthermore, a data table published into an HTML document cannot be reintroduced into its parent application with its original functionality intact, because critical formatting information unique to the parent spreadsheet application, such as any formulas included in the data table, are not maintained. Thus, formulas and other spreadsheet application unique parameters are lost in the publication process. Manipulation of the data from the HTML document within the parent application is thus not available.
Often, it would be desirable to enable changes to data in a table or chart published into an HTML document. For example, assume that an HTML document created by a real estate brokerage firm includes a data table for determining monthly mortgage payments based on the amount of the loan (rounded to the nearest $1000), a current annual interest rate, and a fixed term. Additionally, the web page may include some text relating to the real estate services offered by the brokerage firm and a few testimonials from satisfied customers. Prospective purchasers of real estate may use the table to determine the monthly payments on a property. The table is most easily created in a spreadsheet application, converted into an HTML compatible format, and inserted into an HTML document that includes text produced with an HTML editor.
After several weeks, the brokerage firm may recognize that the table is less useful than desired because the interest rate has changed. To modify the table so that it is based on the newer current interest rate, the broker must create a new table with the spreadsheet application, convert the new table into the HTML compatible format, and then insert the revised table into the HTML document. Note that using only an HTML editor to change the original imported table would require manual input of not just the new interest rate, but also each and every monthly payment listed in the table. The data table in the HTML document does not have any spreadsheet functionality, and changing the interest rate value used in the spreadsheet formula to calculate the monthly payments does not result in an automatic recalculation of the monthly payments values shown in the table within the HTML document. Clearly, it would be desirable to enable a chart or data table in an existing HTML document to be updated using the spreadsheet application, rather than by use of an HTML editor.
It would also be desirable to avoid the need to recreate the data table in the spreadsheet application simply to make a change. While recreating the data table is not necessary if the original data table was saved in its spreadsheet format, there will be times when the spreadsheet format of the data table has not been saved or has been deleted. Under the prior art, if an attempt is made to import the data table or chart from the HTML document back into the spreadsheet application for revisions, any formulas or formatting unique to the spreadsheet application originally used to create that data table or chart would no longer be present, having been lost in the process of translating the data table or chart into the HTML compatible format. Thus, the prior art cannot successfully xe2x80x9croundtripxe2x80x9d the data represented by the data table or chart back from the spreadsheet application, into an HTML document, and then back into the spreadsheet application. It would be desirable for data tables or charts created in a spreadsheet application to be readily inserted into an HTML document, and then subsequently imported back into the spreadsheet application without loss of functionality.
Currently, a data table or chart loses its computational functionality once it is exported from a spreadsheet application into an HTML document. The data table simply becomes a table of entries in an HTML document. Any change in an entry is incapable of causing a change in any other entry. Certainly, it would be more useful if the imported data table or chart retained its spreadsheet functionality, so that a change in one of the cells would cause any other values that depend upon the changed cell to be recalculated. In the previous example of an HTML document for a real estate brokerage firm, an active data table that retains its spreadsheet functionality would enable a user to enter a loan amount, the term, and the current interest rate, causing the monthly mortgage payment based upon these parameters to be determined and displayed.
In accord with the present invention, a method is defined for using an application program in which data having a format and a functionality specific to the application program are created, to publish at least a portion of the data into an HTML document such that when changes are made to the original data selection in the application program, those changes can be readily republished into the HTML document to replace the previously published data selection. Furthermore, when the HTML document containing the published or republished data selection is subsequently opened in the application program, the data selection retains the formatting and functionality that it originally had in the application program. The method uses the application program to select the portion of the data to be published. The data selected are then translated into an HTML compatible format, while preserving parameters that define the format and functionality of the data within the application program used to create the data. Once translated, the translated data are inserted into the HTML document.
Preferably, the application program is a spreadsheet program and the data that are translated comprise either a data table or a chart.
This method preferably includes the step of creating a unique identifier (ID) that is associated with the data that are translated and inserted into the HTML document. The unique ID is stored with the original data from which the portion of the data is selected and also included within the HTML document. The translated data can then replace an older version of the data that were translated and previously inserted into the HTML document by the application program, thereby republishing the data to include changes made after the data were previously published. Reference to the unique ID enables the application program to identify the older version of the data and replace the older version of the data within the HTML document with the translated data comprising the newer version.
Consider the case where the application program is a spreadsheet program and the data selection is a data table that includes a plurality of cells. If at least one cell includes a formula that returns a calculated value in response to a change in a parameter in another of the plurality of cells, the translated data table inserted into the HTML document retains the functionality of the formula, so that a change in the parameter within the HTML document causes a recalculation of the formula to return a new calculated value that is retained when the HTML document is loaded back into the application program.
Preferably, the step of preserving the format of the translated data comprises the step of storing formatting information for the translated data within a style section in the HTML document.
The application program preferably inserts tags into the HTML document, indicating a beginning and end of the translated data inserted, and indicating functional elements of the data.
Other aspects of the present invention are directed to an article of manufacture that includes a memory media for carrying out functions generally consistent with the steps of the method described above, and to a system that includes a memory for storing machine instructions and a processor. When the machine instructions are executed by the processor, they implement functions that are also generally consistent with the steps of the above-described method.